#ifndef SINGLESCENEEXE_H
#define SINGLESCENEEXE_H

#include <QtGui/QWidget>
#include <osg\Vec3>
#include "attachobjecteffect.h"

namespace PublicGui
{
	class PerspectiveView;
}

namespace VrDataCore
{
	class ActorBase;
	class EffectCenter;
}

class SingleSceneExe : public QWidget
{
	Q_OBJECT

public:
	SingleSceneExe(QWidget *parent = 0, Qt::WFlags flags = 0);
	~SingleSceneExe();

	struct ScanParameter
	{
		osg::Vec3			_eye;
		osg::Vec3			_center;
		osg::Vec3			_up;
		int					_distance;
		int					_speed;
		QString				_mode;
		bool				_isInit;
	};
private:
	void defineDefaultCameraParameter();
	void initHudToolbar();
	void addDefaultDrawable();
	void resetScan();
	void toolButtonClick(std::string buttonname);
	void addToolBarButton(int buttonType);
	void setScanMode(int mode);
	void addAdvancedToolBarButton(unsigned int tooltype,unsigned int type,const QString& buttonname,const QString& buttonicon,const QString& buttoniconeffect);
	void playCameraAnimation(const QString& name,bool freedirection);
	void changeSpeed(bool speed);
	PublicGui::PerspectiveView*									_perspectiveView;
	QString														_applicationPath;
	QString														_fileName;
	QVector<ScanParameter>										_modeToScanParameter;
	bool														_firstInit;
	osg::ref_ptr<ControlCenter::AttachObjectEffect>				_attachObjectEffect;
	CoreBase::ActorBase*										_attachObject;
	QStringList													_userDefineCameraAnimationNameList;
	VrDataCore::EffectCenter*									_effectCenter;
public slots:
	void slotOpenFile(const QString& filename);
	void init();
	void viewResizeEvent(const int,const int);
};
#endif